package com.code.user.api;

import com.code.AZPlan.model.bo.UserVipBO;
import com.code.commons.service.CrudService;
import com.code.user.model.bo.*;
import com.code.user.model.po.*;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * 用户服务实现
 *
 * @author tangyifei
 * @since 2019-5-24 09:24:06
 */
public interface UserService extends CrudService<User, String> {

    User registerUser(RegisterUser registerUser);

    User getUserCredential(String id);

    Boolean judgeUserPhoneIsExist(String userPhone);

    Boolean judgeUserEmailIsExist(String userEmail);

    LoginUserCredential getUserByPhone(String userPhone);

    void resetPwd(String userId, String newPwd);

    int addCoinBalance(UserCoinBalance userCoinBalance) throws Exception;

    void updateUserCoinAddress(UserCoinBalance userCoinBalance) throws Exception;

    List<UserAZPlanChannel> getAZPlanChannelList(String userId, String coinType);

    UserCoinBalance recharge(UserCoinBalance userCoinBalance);

    UserCoinBalanceBO getUsdtVersion(String recommenderPhone);

    UserCoinBalance getUserCoinBalance(String userId, String coinType, String coinAddress);

    String getUserCoinAddressByUserId(String userId, String coinType);

    BigDecimal getTotalRechargeAmount(String userId, String coinType, String coinAddress);

    void bindingUserTokenAndUserPhone(String mobilePhone, String tokenId);

    List<UserToken> getTokenList(List<UserVipBO> userVipBOS);

    List<UserCoinBalance> getUserWalletList(String coinType);

    int reduceUserCoinBalance(UserCoinBalance userCoinBalance);

    Map<String, Object> getDirectRecommends(String userId, Integer entryMoneyState, Integer page, Integer pageSize);

    String getUserTokenByUserPhone(String mobilePhone);

    int addUserCertification(UserCertification userCertification);

    UserCertification getUserCertificationByUserId(String userId);

    int getUserCertificationCountByCertificationNumber(String certificationNumber);

    UserCertificationBO getUserCertificationList(UserCertificationBO userCertificationBO);

    int updateUserCertification(UserCertification userCertification);

    int updateSystemSetting(SystemSettingBO systemSettingBO);

    SystemSettingBO getSystemSettingBySystemKey(String systemKey);

    int recharge(RechargeTranRecord rechargeTranRecord);

    List<UserCoinBalance> getUserCoinBalanceList(String userId);

    PhoneBO getUserPhones(String phone, Integer page, Integer pageSize);

    int setUserOperate(UserOperateAuth userOperateAuth);

    UserOperateAuth getUserOperateAuthByUserIdAndOperateCode(String userId, String operateCode);

}
